const fs = require('fs')
const path = require('path')

const dirname = path.join(__dirname, '1.txt')

fs.readFile(dirname, 'utf8', (err, data) => {
    console.log(data)
})
fs.writeFile(dirname, "123", (err) => {
    if (err) {
        console.log("失败！")
    }
    console.log("成功")
})
// 小红=99 小白=100 小黄=70 小黑=60 小绿=77
// const str = "./asdfsda/asdfsad/fds/bb.html"
// console.log(path.basename(str))
// console.log(path.basename(str, ".html"))

